/**
 * @file
 * @description
 * @author 黄敏
 * @since 2025-08-23 08:17
 */

import {
  mdiAccount,
  mdiBookmarkMultiple,
  mdiCalendar,
  mdiCog,
  mdiConnection,
  mdiDomain,
  mdiEmail,
  mdiHistory,
  mdiImageMultiple,
  mdiMagnify,
  mdiMemory,
  mdiMessageText,
  mdiRhombusSplit,
  mdiTimelineText,
  mdiUploadCircle
} from '@mdi/js'

import { type SpecialTabId, TAB_IDS } from './index'

/**
 * 系统标签页
 */
export const SYSTEM_TABS: Record<SpecialTabId, Readonly<F2.tab.CreateWithId>> = {
  [TAB_IDS.LAYOUT_VIEW]: Object.freeze({
    id: TAB_IDS.LAYOUT_VIEW,
    url: 'f2://layoutBrowser',
    title: '浏览器布局视图'
  }),
  [TAB_IDS.SEPARATE_LAYOUT_VIEW]: Object.freeze({
    id: TAB_IDS.SEPARATE_LAYOUT_VIEW,
    url: 'f2://layoutInSeparate',
    title: '独立窗口布局视图'
  }),
  [TAB_IDS.ACCOUNT]: Object.freeze({
    id: TAB_IDS.ACCOUNT,
    url: 'f2://account',
    title: '公司组织',
    icon: mdiDomain,

    autoOpenOnStartup: true
  }),
  [TAB_IDS.CALENDAR]: Object.freeze({
    id: TAB_IDS.CALENDAR,
    url: 'f2://calendar',
    title: '日历',
    icon: mdiCalendar
  }),
  [TAB_IDS.MAIL]: Object.freeze({
    id: TAB_IDS.MAIL,
    url: 'f2://mail',
    title: '邮件',
    icon: mdiEmail
  }),
  [TAB_IDS.SEARCH]: Object.freeze({
    id: TAB_IDS.SEARCH,
    url: 'f2://sidebarSearch',
    title: '主搜索',
    icon: mdiMagnify
  }),
  [TAB_IDS.CAMPAIGN]: Object.freeze({
    id: TAB_IDS.CAMPAIGN,
    url: 'f2://campaign',
    title: '战役',
    icon: mdiRhombusSplit
  }),
  [TAB_IDS.BROWSER_PLUGIN]: Object.freeze({
    id: TAB_IDS.BROWSER_PLUGIN,
    url: 'f2://browserPlugin',
    title: '浏览器插件',
    icon: mdiConnection
  }),
  [TAB_IDS.CONTACT_DETAIL]: Object.freeze({
    id: TAB_IDS.CONTACT_DETAIL,
    url: 'f2://contact',
    title: '联系人详情',
    icon: mdiAccount
  }),
  // 进程监控
  [TAB_IDS.PROCESS_MONITOR]: Object.freeze({
    id: TAB_IDS.PROCESS_MONITOR,
    url: 'f2://process',
    title: '进程监控',
    icon: mdiMemory
  }),

  [TAB_IDS.SETTINGS]: Object.freeze({
    id: TAB_IDS.SETTINGS,
    url: 'f2://settings',
    title: '设置',
    icon: mdiCog
  }),
  [TAB_IDS.HISTORY]: Object.freeze({
    id: TAB_IDS.HISTORY,
    url: 'f2://history',
    title: '历史记录',
    icon: mdiHistory
  }),
  [TAB_IDS.BOOKMARKS]: Object.freeze({
    id: TAB_IDS.BOOKMARKS,
    url: 'f2://bookmarks',
    title: '书签',
    icon: mdiBookmarkMultiple
  }),

  [TAB_IDS.IMAGE_PREVIEW]: Object.freeze({
    id: TAB_IDS.IMAGE_PREVIEW,
    url: 'f2://imagePreview',
    title: '图片预览',
    icon: mdiImageMultiple,
    sidebarUi: {
      showPinButton: false,
      showSeparateWindowButton: false,
      showMoreMenuItems: false
    }
  }),
  [TAB_IDS.TASK]: Object.freeze({
    id: TAB_IDS.TASK,
    url: 'f2://task',
    title: '异步任务',
    icon: mdiUploadCircle,
    autoOpenOnStartup: true
  }),
  [TAB_IDS.ACTIVITY]: Object.freeze({
    id: TAB_IDS.ACTIVITY,
    url: 'f2://activity',
    title: '活动时间线',
    icon: mdiTimelineText
  }),
  [TAB_IDS.NOTICE]: Object.freeze({
    id: TAB_IDS.NOTICE,
    url: 'f2://notifications',
    title: '通知',
    icon: mdiMessageText,
    sidebarUi: {
      showCloseButton: false
    }
  }),
  [TAB_IDS.UPDATER]: Object.freeze({
    id: TAB_IDS.UPDATER,
    url: 'f2://updater',
    title: '更新器',
    icon: mdiUploadCircle,
    sidebarUi: {
      showMinimizeButton: false,
      showMaximizeButton: false
    }
  })
}
